<template>
  <div class="right">
    <!--  -->
    <span
      v-for="(v, i) in list"
      :key="i"
      :class="v.isChecked ? 'active' : ''"
      @click="v.isChecked = !v.isChecked"
      >{{ v.name }}</span
    >
  </div>
</template>

<script>
export default {
  props: ['list']
};
</script>

<style>

.right {
  flex: 1;
  /* height: 100%; */
  overflow-y: scroll;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
}

.right span {
  padding: 10px 16px;
  background: skyblue;
  border-radius: 10px;
  color: #fff;
  margin: 10px;
}

.right span.active {
  background: tomato;
}
</style>